#!/bin/sh
#
#fengyz @ tz 
if [ -e /tmp/.in_peripheral_test ]; then
	touch /tmp/.wps_button_press
fi

[ "${ACTION}" = "released" ] || exit 0

logger "$BUTTON pressed for $SEEN seconds"

if [ -e /tmp/.in_peripheral_test ]; then
	rm /tmp/.wps_button_press
	exit
fi

if [ "$SEEN" -gt 5 ];then
	/sbin/wps_handler "2.4G"
else
	/sbin/wps_handler "5G"
fi



echo "wps key pressed " > /dev/console

return 0
